package com.d3works.studio.service.mapper;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown = true)
public class MapperSelected {

  private String value = null;

  private String targetName = null;

  public String getValue() {
    return value;
  }

  public void setValue(String value) {
    this.value = value;
  }

  public String getTargetName() {
    return targetName;
  }

  public void setTargetName(String targetName) {
    this.targetName = targetName;
  }

  public String toScript() {
    String script = value;
    if (targetName != null && !targetName.equals("_selectId")) {
      script = targetName + "," + script;
    }

    return script;
  }
}
